package com.sikaryofficial.adaptermq.controller;


import com.sikaryofficial.adaptermq.message.body.SyncDataMessage;
import com.sikaryofficial.adaptermq.service.ISyncService;
import com.sikaryofficial.common.core.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 *  数据同步管理
 *
 **/
@RestController
@Slf4j
@RequestMapping("/sync/base")
@Api(tags = "数据同步管理")
public class SyncController {
    @Autowired
    private ISyncService syncService;

    @PostMapping("/processData")
    @ApiOperation("数据处理")
    public R<Boolean> processData(@RequestBody SyncDataMessage message) {
        syncService.processData(message);
        return R.ok(true);
    }
}
